#include <iostream>
#include <stdio.h>

using namespace std;

int main() {
    int a,b,c,n=2;
    cin >> a >> b >> c;
    while((a % n != b % n)||(b % n != c % n)||(c % n != a % n)){
        n += 1;
    }
    cout << n;
    return 0;
}